Integrated circuits generally run off of a ground terminal and a power supply rail or a positive and a negative power supply rail. In some circuits, in addition to a ground terminal, two separate power supply rails are required. For instance, a chip that includes both digital and analog circuitry may require a separate power supply to avoid introducing noise from the digital into the analog circuitry. Also in many cases, the analog circuitry requires a different voltage level than the digital circuitry.
In CMOS circuits that have two power supplies at different voltages, the grounding of one of the power supplies to which an output driver circuit is connected may cause the grounding of the output signal. This can occur, for example, in an N-well CMOS process, where an output driver has a p-channel pull-up transistor at the output. If the power supply rail to which the source and N-well terminals of the pull-up transistor is connected were grounded, the P+ (drain terminal of the pull-up transistor) to N-well junction would be forward biased causing the output to fall to ground.
This can be avoided if the N-well in which the p-channel pull-up transistor resides is connected to the highest potential. In that case, grounding the rail would not cause the output to fall below the value of the highest power supply voltage. However, when the voltage levels of the power supplies are not fixed (and it is not known which supply is highest), the well can not be hardwired to one of the rails. It is therefore necessary to switch the potential of the well to that one of the rails which at any given time is at the highest potential.
Existing circuits addressing this problem have utilized diodes to connect the well to the highest potential, or switches that are digitally controlled by separate logic circuits. These approaches have certain drawbacks. When diodes are used, the cathode terminals connect together and to the well, while each anode terminal connects to a separate power supply rail. This way the diode connected to the highest potential will be forward biased while others would be reversed biased. With this approach, the potential at the well will always be a diode drop below the power supply rail and the diode would be on the verge of conducting current. Beside the lowering of the voltage by one diode drop, this circuit may cause latch-up problems. The approach using digitally controlled switches requires additional circuitry which must be powered on at all times to generate the correct control signals. This approach is therefore not flexible in situations where either power supply may be grounded.